#include <stdio.h>

int main() {
	
	float input,salary,tax=0;
	scanf("%f",&input);
	salary=input;
	
	if(salary>15000) {
		tax+=0.2*(salary-15000);
		salary=15000;
	}
	if(salary>10000) {
		tax+=0.12*(salary-10000);
		salary=10000;
	}
	if(salary>5000) {
		tax+=0.08*(salary-5000);
		salary=5000;
	}
	if(salary>3000) {
		tax+=0.05*(salary-3000);
		salary=3000;
	}
	
	printf("Origin salary: %.2f\nTax: %.2f\nRemained salary: %.2f\n",input,tax,input-tax);
	
	return 0;
} 
